#ifndef __DSTH_TIMER_QUEUE_H__
#define __DSTH_TIMER_QUEUE_H__

#include <vector>
#include "TimerId.h"

namespace dsth {
class EventLoop;
class Timer;
class TimerQueue {
public:
    explicit TimerQueue(EventLoop* loop);
    ~TimerQueue();
    TimerId AddTimer(const TimerCallBack& callback, uint64_t duetime, uint64_t period);

private:
    // Can't invoke copy constructor or assignment operator
    TimerQueue(const TimerQueue&);
    void operator=(const TimerQueue&);

    typedef std::vector<Timer*> TimerList;
    EventLoop* loop_ptr_;
    HANDLE timerQueue_;
    TimerList timerList_;
};

} // namespace
#endif // __DSTH_TIMER_QUEUER_H__
